package com.yidu.manage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yidu.common.domain.user.UserInfo;
import com.yidu.common.utils.EntityUtil;
import com.yidu.manage.mapper.TUserInfoMapper;
import com.yidu.manage.service.ITUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author lsm
 * @since 2021-04-06
 */
@Service
public class TUserInfoServiceImpl extends ServiceImpl<TUserInfoMapper, UserInfo> implements ITUserInfoService
{
    @Autowired
    private TUserInfoMapper userInfoMapper;

    @Override
    public PageInfo<UserInfo> list(UserInfo userInfo)
    {
        PageHelper.startPage(userInfo.getPage(), userInfo.getSize());
        return new PageInfo<>(userInfoMapper.selectByMap(EntityUtil.getMapByEntity(userInfo)));
    }
}
